<#assign ctrl_base_name = "PanelControlBase"/>
<#assign import_block>
import { PanelDetailModel,PanelRawitemModel,PanelTabPanelModel,PanelTabPageModel,PanelFieldModel,PanelContainerModel,PanelControlModel,PanelUserControlModel,PanelButtonModel } from '@/model/panel-detail';
import ${srfclassname('${ctrl.codeName}')}Model from './${srffilepath2(ctrl.codeName)}-${ctrl.getControlType()?lower_case}-model';
import CodeListService from "@service/app/codelist-service";
</#assign>
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>

    /**
     * 详情模型集合
     *
     * @type {*}
     * @memberof ${srfclassname('${ctrl.codeName}')}
     */
    public detailsModel: any = {
        <#list ctrl.getAllPSPanelItems() as panelItem>
        ${panelItem.name}: ${P.getPartCode(panelItem, 'ITEM_MODEL').code},
        </#list>
    };

    /**
     * 面板逻辑
     *
     * @public
     * @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
     * @memberof ${srfclassname('${ctrl.codeName}')}
     */
    public panelLogic({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void {
        <#if P.getPartCode(item,'PANEL_LOGIC').code?length gt 0>
        ${P.getPartCode(item,'PANEL_LOGIC').code}
        </#if>
    }

    /**
     * 数据模型对象
     *
     * @type {${srfclassname('${ctrl.codeName}')}Model}
     * @memberof ${srfclassname('${ctrl.codeName}')}
     */
    public dataModel: ${srfclassname('${ctrl.codeName}')}Model = new ${srfclassname('${ctrl.codeName}')}Model();

    /**
     * 界面行为
     *
     * @param {*} row
     * @param {*} tag
     * @param {*} $event
     * @memberof ${srfclassname('${ctrl.codeName}')}
     */
    public uiAction(row: any, tag: any, $event: any) {
        <#if ctrl.getPSAppViewLogics()??>
        <#list ctrl.getPSAppViewLogics() as logic>
        <#if logic.getPSAppViewUIAction().getPSUIAction()??>
        <#assign action = logic.getPSAppViewUIAction().getPSUIAction()>
        if(Object.is('${action.getUIActionTag()}', tag)) {
            this.${logic.getName()}(row, tag, $event);
        }
        </#if>
        </#list>
        </#if>
    }
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>